<?xml version="1.0"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	template="/WEB-INF/templates/templateBase.xhtml">

	<ui:param name="pageTitle" value="#{msg.ajustarSaldoBancoHoras}" />

	<ui:define name="pageContent">

		<style type="text/css">
.inputHora {
	width: 100px;
}

.inputHoraReadOnly {
	background-color: #eeeeee;
	width: 100px;
}

.inputObservacao {
	width: 350px;
	height: 80px;
}

.botao {
	width: 100px;
}
</style>

		<h:form id="filtrosRelatorio" styleClass="centralized-form" style="margin-bottom: 15px;">
			<fieldset>
				<legend>#{msg.ajustarSaldoBancoHoras}</legend>
				<h:panelGrid columns="2" style="margin-left: 50px;">
					<h:outputLabel value="#{msg.colaborador}:" />
					<h:selectOneMenu value="#{ajusteBH.idColabSelecionado}">
						<f:ajax event="change" listener="#{ajusteBH.selecionouColaborador}"
							render="idSaldoAtual idNovoSaldo" />
						<f:selectItem itemValue="0" itemLabel="-- Selecione --" />
						<f:selectItems value="#{ajusteBH.colaboradores}" />
					</h:selectOneMenu>

					<h:outputLabel value="#{msg.saldoAtual}:" />
					<h:inputText id="idSaldoAtual" value="#{ajusteBH.saldoAtual}" readonly="true"
						styleClass="inputHoraReadOnly" />

					<h:outputLabel value="#{msg.novoSaldo}:" />
					<h:inputText id="idNovoSaldo" value="#{ajusteBH.novoSaldo}" required="true"
						requiredMessage="#{msg.msgInformeNovoSaldo}" styleClass="inputHora" />

					<h:outputLabel value="#{msg.motivoAjuste}:" styleClass="label" />
					<h:inputTextarea value="#{ajusteBH.motivoAjuste}" required="true"
						requiredMessage="#{msg.msgInformeMotivoAjuste}" styleClass="inputObservacao" />

					<!-- Gambi para colocar o botão na segunda coluna: -->
					<h:outputLabel value="" styleClass="label" />
					<h:commandButton value="#{msg.salvar}" action="#{ajusteBH.salvar}" styleClass="botao" />
				</h:panelGrid>

				<ace:messages />
			</fieldset>
		</h:form>

	</ui:define>
</ui:composition>